﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UniversaleMain.Master" AutoEventWireup="true" CodeBehind="ShoppingCart.aspx.cs" Inherits="FYPDemo.WebForm10" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h1 class="h1_title">Shopping Cart</h1>
    <asp:ListView ID="ListView1" runat="server" 
        ondatabound="ListView1_DataBound">
        <AlternatingItemTemplate>
            <tr style="background-color:#FFF8DC; text-align:center">
                <td>
                    <img id="Img1" runat="server" src='<%# Eval("ImagePath") %>' alt="" style="height: 128px; width: 150px"/>
                </td>
                <td>
                    <asp:Label ID="ProductIDLabel" runat="server" Text='<%# Eval("ProductID") %>'/>
                </td>
                <td>
                    <asp:Label ID="ProductNameLabel" runat="server" 
                        Text='<%# Eval("ProductName") %>' />
                </td>
                <td>
                    <asp:Label ID="QuantityLabel" runat="server" Text='<%# Eval("Quantity") %>' />
                </td>
                <td>
                    <asp:Label ID="PriceLabel" runat="server" Text='<%# Eval("UnitPrice") %>' />
                </td>
                <td>
                    <asp:Label ID="SubTotalLabel" runat="server" Text='<%# Eval("Price") %>' />
                </td>
            </tr>
        </AlternatingItemTemplate>
        <EmptyDataTemplate>
            <table id="Table1" runat="server" 
                style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;">
                <tr>
                    <td>
                        No data was returned.</td>
                </tr>
            </table>
        </EmptyDataTemplate>
        <ItemTemplate>
            <tr style="background-color:#DCDCDC;color: #000000;">
                <td style="width: 110px ; text-align:center">
                    <img id="Img1" runat="server" src='<%# Eval("ImagePath") %>' alt="" style="height: 128px; width: 128px"/>
                </td>
                <td style="width: 110px ; text-align:center">
                    <asp:Label ID="ProductIDLabel" runat="server" Text='<%# Eval("ProductID") %>'/>
                </td>
                <td style="width: 110px ; text-align:center">
                    <asp:Label ID="ProductNameLabel" runat="server" 
                        Text='<%# Eval("ProductName") %>' />
                </td>
                <td style="width: 110px ; text-align:center">
                    <asp:Label ID="QuantityLabel" runat="server" Text='<%# Eval("Quantity") %>' />
                </td>
                <td style="width: 110px ; text-align:center">
                    <asp:Label ID="PriceLabel" runat="server" Text='<%# Eval("UnitPrice") %>' />
                </td>
                <td style="width: 110px ; text-align:center">
                    <asp:Label ID="SubTotalLabel" runat="server" Text='<%# Eval("Price") %>' />
                </td>
            </tr>
        </ItemTemplate>
        <LayoutTemplate>
            <table id="Table2" runat="server">
                <tr id="Tr1" runat="server">
                    <td id="Td1" runat="server">
                        <table ID="itemPlaceholderContainer" runat="server" border="1" 
                            style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;font-family: Verdana, Arial, Helvetica, sans-serif;">
                            <tr id="Tr2" runat="server" style="background-color:#DCDCDC;color: #000000;">
                                <th id="Th1" runat="server" style="width: 110px ; text-align:center">
                                    </th>
                                <th id="Th2" runat="server">
                                    ProductID</th>
                                <th id="Th3" runat="server">
                                    ProductName</th>
                                <th id="Th4" runat="server">
                                    Quantity</th>
                                <th id="Th5" runat="server">
                                    Price</th>
                                <th id="Th6" runat="server">
                                    Sub-Total</th>
                            </tr>
                            <tr ID="itemPlaceholder" runat="server">
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr id="Tr3" runat="server">
                    <td id="Td2" runat="server" 
                        style="text-align: center;background-color: #CCCCCC;font-family: Verdana, Arial, Helvetica, sans-serif;color: #000000;">
                        <asp:DataPager ID="DataPager1" runat="server">
                            <Fields>
                                <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" 
                                    ShowLastPageButton="True" />
                            </Fields>
                        </asp:DataPager>
                    </td>
                </tr>
            </table>
        </LayoutTemplate>
    </asp:ListView><br /><br />
    <strong>Total: </strong><asp:Label ID="lblTotal" runat="server" Text="" /><br /><br />
    <asp:Button ID="btnCheckout" runat="server" Text="Checkout" 
        onclick="btnCheckout_Click" CssClass="buttonbg" />

    </asp:Content>
